package com.carol.lmsbe.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 设备申请实体类
 */
@Data
@TableName("equipment_application")
public class EquipmentApplication {

    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("applicant_id")
    private Long applicantId;

    @TableField("laboratory_id")
    private Long laboratoryId;

    @TableField("category")
    private String category;

    @TableField("name")
    private String name;

    @TableField("specification")
    private String specification;

    @TableField("quantity")
    private Integer quantity;

    @TableField("unit_price")
    private BigDecimal unitPrice;

    @TableField("reason")
    private String reason;

    @TableField("urgency")
    private String urgency; // LOW-低, MEDIUM-中, HIGH-高

    @TableField("status")
    private String status; // PENDING-待审批, APPROVED-已批准, REJECTED-已拒绝, PURCHASED-已采购

    @TableField("approver_id")
    private Long approverId;

    @TableField("approval_time")
    private LocalDateTime approvalTime;

    @TableField("approval_comment")
    private String approvalComment;

    @TableField("equipment_id")
    private Long equipmentId;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}
